/*
* StakeholderTierEntity.java
*/
package ejb;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class StakeholderTierEntity implements Serializable {

    @Id
    private String name;
    private int commissionPercent;
    private double feeSubscription;
    private double feeMarketIntelligence;

    /** Creates a new instance of StakeholderTierEntity */
    public StakeholderTierEntity() {}

    public boolean create(String name, int commissionPercent, double feeSubscription, double feeMarketIntelligence) {
        System.out.println("create method: entered here!");
        System.out.println(name + " " + commissionPercent + " " + feeSubscription + " " + feeMarketIntelligence);
        try {
            this.setName(name);                            
            this.setCommissionPercent(commissionPercent);
            this.setFeeSubscription(feeSubscription);
            this.setFeeMarketIntelligence(feeMarketIntelligence);
            System.out.println("wtf");
            return true;
        }catch (Exception ex) {
            return false;
        }
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCommissionPercent() {
        return commissionPercent;
    }

    public void setCommissionPercent(int comissionPercent) {
        this.commissionPercent = comissionPercent;
    }

    public double getFeeSubscription() {
        return feeSubscription;
    }

    public void setFeeSubscription(double feeSubscription) {
        this.feeSubscription = feeSubscription;
    }

    public double getFeeMarketIntelligence() {
        return feeMarketIntelligence;
    }

    public void setFeeMarketIntelligence(double feeMarketIntelligence) {
        this.feeMarketIntelligence = feeMarketIntelligence;
    }
}

